class PodcastTagLib {
	
		def podcast = { attrs ->
				def feed = new XmlSlurper().parseText(new URL(attrs['feedURL']).text)
				
				out << "<div class='podcast'>"
				out << "<span class='title'><a href='${feed.channel.link}'>${feed.channel.title}</a></span><br/>"
				out << "<img src='${feed.channel.image?.url}' />"
				out << "<span class='description'>${feed.channel.description}</span><br/>"
		
				feed.channel.item.each { item ->
							out << "<div class='item'>"
							out << "<span class='title'><a href='${item.link}'>${item.title}</a></span><br/>"
							out << "<span class='description'>${item.description}</span>"
							out << "</div>"
				}

				out << '</div>'
	 }
}
